<ul id="nav-secondary">
    <ul class="nav-secondary">                                                                             

        <? foreach($items as $item) { ?>

        <li <? if (isset($item['selected'])) print 'class="active"' ?>>
            <a href="<?=site_url($item['controller'])?>" title="<?=$item['name']?>"><?=$item['name']?></a>

        <? if (@$item['content']) { ?>

            <ul>
           
           <? foreach($item['content'] as $subitem) { ?>

                <li <? if (isset($subitem['selected'])) print 'class="active"' ?>>
                    <a href="<?=site_url($subitem['controller'])?>" title="<?=$subitem['name']?>"><?=$subitem['name']?></a>

                    <? if (@$subitem['content']) { ?>

                        <ul>

                        <? foreach($subitem['content'] as $subsubitem) { ?>

                            <li <? if (isset($subsubitem['selected'])) print 'class="active"' ?>>
                                <a href="<?=site_url($subsubitem['controller'])?>" title="<?=$subsubitem['name']?>"><?=$subsubitem['name']?></a>

                                    <? if (@$subsubitem['content']) { ?>

                                        <ul>

                                        <? foreach($subsubitem['content'] as $subsubsubitem) { ?>

                                            <li <? if (isset($subsubsubitem['selected'])) print 'class="active"' ?>>
                                                <a href="<?=site_url($subsubsubitem['controller'])?>" title="<?=$subsubsubitem['name']?>"><?=$subsubsubitem['name']?></a>



                                            </li>

                                        <? } ?>

                                        </ul>

                                    <? } ?>





                            </li>

                        <? } ?>

                        </ul>

                    <? } ?>

                </li>

           <? } ?>

            </ul>

        <? } ?>

        </li>

        <? } ?>

    </ul>
</ul>

